home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 1.iso / toolbox / documents / OpenGL / opengldoc / glspec / reference_plane.spec < prev    next >
Encoding:
Text File  |  1996-11-11  |  4.2 KB  |  138 lines

  1. Name
  2.  
  3.     SGIX_reference_plane
  4.  
  5. Name String
  6.  
  7.     GL_SGIX_reference_plane
  8.  
  9. Version
  10.  
  11.     $Date: 1996/04/01 23:23:11 $ $Revision: 1.1 $
  12.  
  13. Number
  14.  
  15.     60
  16.  
  17. Dependencies
  18.  
  19.     None
  20.  
  21. Overview
  22.  
  23.     This extension allows a group of coplanar primitives to be rendered
  24.     without depth-buffering artifacts.  This is accomplished by generating
  25.     the depth values for all the primitives from a single ``reference plane''
  26.     rather than from the primitives themselves.  This ensures that all the
  27.     primitives in the group have exactly the same depth value at any given
  28.     sample point, no matter what imprecision may exist in the original
  29.     specifications of the primitives or in the GL's coordinate transformation
  30.     process.
  31.  
  32.     The reference plane is defined by a four-component plane equation.
  33.     When glReferencePlaneSGIX is called, equation is transformed by the
  34.     transpose-adjoint of a matrix that is the complete object-coordinate
  35.     to clip-coordinate transformation.  The resulting clip-coordinate
  36.     coefficients are transformed by the current viewport when the reference
  37.     plane is enabled.
  38.  
  39.     The reference plane is enabled and disabled with glEnable and glDisable.
  40.  
  41.     If the reference plane is enabled, a fragment (xf,yf,zf) will have a
  42.     new z coordinate generated from (xf,yf) by giving it the same z value
  43.     that the reference plane would have at (xf,yf).
  44.  
  45. Issues
  46.  
  47.     * What should the default reference plane be?
  48.        - (0,0,1,0) in window coords seems good 
  49.  
  50.     * What happens if the reference plane does not intersect the view frustum?
  51.        - can disallow enabling of the plane, or substitute the default plane. 
  52.  
  53.     * Should it be possible to query the validity of the reference plane just
  54.       like RasterPos?
  55.        - could be useful
  56.  
  57. New Procedures and Functions
  58.  
  59.     void glReferencePlaneSGIX(const GLdouble *equation);
  60.  
  61. New Tokens
  62.  
  63.     Accepted by the <pname> parameter of glGet, and the <cap> parameter
  64.     of glEnable, glDisable, and glIsEnabled:
  65.  
  66.         REFERENCE_PLANE_SGIX
  67.  
  68.     Accepted by the <pname> parameter of glGet:
  69.  
  70.         REFERENCE_PLANE_EQUATION_SGIX
  71.  
  72. Additions to Chapter 2 of the 1.0 Specification (OpenGL Operation)
  73.  
  74.     None
  75.  
  76. additions to Chapter 3 of the 1.0 Specification (Rasterization)
  77.  
  78.     If enabled, the reference plane is used to calculate the fragment's z
  79.     value based on the fragment's x and y values and the reference plane
  80.     itself.
  81.  
  82.     Let the reference plane be defined by a four-component plane equation
  83.     in window coordinates.
  84.  
  85.         a*x + b*y + c*z + d = 0.0
  86.  
  87.     then if the incoming fragment has an x value of xf and a y value of yf,
  88.     the fragment's z value zf will be:
  89.  
  90.         zf = -(d + a*xf + b*yf) / c;
  91.  
  92.     The generated zf is undefined if it falls outside the valid zbuffer range.
  93.     (That is what KONA does).
  94.  
  95. Additions to Chapter 4 of the 1.0 Specification (Per-Fragment Operations
  96. and the Frame Buffer)
  97.  
  98.     None
  99.  
  100. Additions to Chapter 5 of the 1.0 Specification (Special Functions)
  101.  
  102.     None
  103.  
  104. Additions to Chapter 6 of the 1.0 Specification (State and State Requests)
  105.  
  106.     None
  107.  
  108. Additions to the GLX Specification
  109.  
  110.     A new GL rendering command is needed to support
  111.     ReferencePlaneSGIX().  The following command is sent to the
  112.     server as part of a glXRender request:
  113.  
  114.     ReferencePlaneSGIX
  115.             2       20              rendering command length
  116.             2       TBD             rendering command opcode
  117.             4       FLOAT32         a (x coefficient) of plane equation
  118.             4       FLOAT32         b (y coefficient) of plane equation
  119.             4       FLOAT32         c (z coefficient) of plane equation
  120.             4       FLOAT32         d (constant term) of plane equation
  121.  
  122.     No new protocol is required to handle state retrieval.
  123.  
  124. Errors
  125.  
  126.     INVALID_OPERATION is generated if ReferencePlaneSGIX is called between
  127.     execution of Begin and the corresponding execution of End.
  128.  
  129. New State
  130.  
  131.     Get Value                       Get Command  Type  Initial Value     Attrib
  132.     ---------                       -----------  ----  -------------     ------
  133.     REFERENCE_PLANE_SGIX             IsEnabled     B      FALSE       transform/enable
  134.     REFERENCE_PLANE_EQUATION_SGIX    GetFloatv     V      ???         transform
  135.  
  136.     The plane coefficiants returned by Get() are in clip coordinates.
  137.  
  138.